﻿<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="edge">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1.0,user-scalable=0">
    <meta content="telephone=no" name="format-detection" />
    <meta name="description" content="">
    <meta name="keywords" content="">
    <title>知识库-我要问</title>
    <link rel="stylesheet" type="text/css" href="css/reset.css">
    <link rel="stylesheet" type="text/css" href="css/global.css">
    <link rel="stylesheet" type="text/css" href="css/media.css">
    <link rel="stylesheet" type="text/css" href="css/loading.css">
    <script type="text/javascript" src="js/lib/loading.js"></script>
</head>

<body id="app">
    <!-- 头部 -->
    <header class="header">
        <a href="javascript:void(0);" title="用户中心" class="icon userIcon" @click="userSideFn();"></a>
        <div class="clearfix search-box" @click="search();">
            <input type="button" class="fl search-btn">
            <input type="text" id="searchword" class="search-txt" placeholder="搜索" value="" maxlength="30">
        </div>
        <a href="javascript:void(0);" title="" class="icon addIcon" @click="add();"></a>
    </header>

    <!-- 我要问 -->
    <section class="padT23 padB23 asking" v-show="!showModal">
        <!-- tab -->
        <ul class="clearfix tabUl quesTab tabFixed">
            <li v-bind:class="{'on':tabs==0}" @click="slides(0,$event)">最新</li>
            <li v-bind:class="{'on':tabs==1}" @click="slides(1,$event)">最热</li>
            <li v-bind:class="{'on':tabs==2}" @click="slides(2,$event)">分类</li>
        </ul>
        <div>
            <!-- 最新 -->
            <ul class="tabCont quesCont askCont tabBox" v-if="screenSide" v-cloak>
                <li :class="info.isClose ==1 ? 'overQues':''" v-for="info in quesList" v-touch:swipe="swipeLeft($event)" v-touch-options:swipe="{ direction: 'horizontal' }">
                    <a href="askDetail.html?id={{info.id}}&back=asking.html" class="db">
                        <h3 class="font26 color22 titles">{{info.title}}</h3>
                        <span class="db font26 color21 descText">{{ info.content | delimages | delhtml}}</span>
                        <div class="clearfix marT24 askImgBox">
                            <!--<span class="db fl j_6 askImg" v-for='(index, item) in info.contentPicture' track-by="$index"><img data-src="{{item}}" src="images/imgload.gif" alt="" class="loadImg"></span>-->
                            <span v-for="(index, item) in info.content | imageurls" track-by="$index">
                                <span class="db fl j_6 askImg" v-if="index < 4">
                                    <img data-src="{{item}}" src="images/imgload.gif" alt="" class="loadImg">
                                </span>
                            <em class="imgNum" v-if="index >= 4">{{index + 1}}</em>
                            </span>
                        </div>
                        <!--
        				<div class="clearfix askImgBox">
        					<span class="db fl j_6 askImg" v-for='(index, item) in info.contentPicture' track-by="$index"><img data-src="{{item}}" src="images/imgload.gif" alt="" class="loadImg"></span>
        				</div>
                        -->
                        <span class="db font18">
        				<template v-if="info.type.length>0">
                            <a href="askList.html?id={{info.id}}&name={{info.name}}" class="font18 colorB tips" v-for="info in info.type"><em>{{ info.name }}</em></a>
                        </template>
                        <span class="colorb6">{{ info.date }}</span>
                        </span>
                        <div class="clearfix marT12 padT24 borderT">
                            <img :src="info.headPic" class="fl borderRadius wh45">
                            <span class="db fl font20 color72 name">{{info.author}}<em class="colorB">({{info.level}})</em></span>
                            <span class="fr comIcon">{{info.commentCount}}</span>
                            <span class="fr view">{{info.readCount}}</span>
                        </div>
                    </a>
                    <div class="font26 dib shareColl two">
                        <a href="javascript:void(0);" @click="share({shareId:info.id,shareTit:info.title,sharePic:info.content},$event);" class="shareIcon"></a>
                        <a href="javascript:void(0);" @click="Collection({dataID:info.id},$event);" class="collIcon"></a>
                    </div>
                </li>
                <span class="loading-more">加载更多...</span>
            </ul>
            <!-- 分类 -->
            <div class="tabCont bgff quesCate" v-else="screenSide" v-cloak>
                <ul class="clearfix borderspace cateList">
                    <li v-for="info in classify"><a href="askList.html?id={{info.id}}&name={{info.name}}&back=asking.html" class="textC ell cateDate">{{ info.name }}</a></li>
                </ul>
            </div>
        </div>
    </section>

    <!-- 用户中心 -->
    <section v-show="userSide" v-cloak>
        <div class="popbg" @click="userSideFn();"></div>
        <div class="pad24 userSide">
            <a href="myUserCenter.html?back=asking.html" class="db">
                <div class="clearfix nameInfo">
                    <img src="images/user.png" class="head" />
                    <span class="dib font28 colorff name">{{user.userName}}<em class="color3b">({{user.level}})</em><br/><em class="font18">{{user.department}}</em></span>
                    <i class="next"></i>
                </div>
            </a>
            <ul class="font28 sideBox">
                <li><a href="dynamicKnowledge.html?back=asking.html" class="db sideDate zsIcon">知识动态</a></li>
                <li><a href="myShare.html?back=asking.html" class="db sideDate sjIcon">我的分享</a></li>
                <li><a href="myCare.html?back=asking.html" class="db sideDate gzIcon">我的关注</a></li>
                <li><a href="vault.html?back=asking.html" class="db sideDate jkIcon">我的金库</a></li>
                <li>
                    <a href="newsList.html?back=asking.html" class="db sideDate xxIcon">消息中心</a>
                    <i :class="user.IsNotice>0 ? 'hasNotice' : ''"></i>
                </li>
                <li><a href="myCollect.html?back=asking.html" class="db sideDate scIcon">我的收藏</a></li>
                <li><a href="shop.html?back=asking.html" class="db sideDate dhIcon">兑换超市</a></li>
                <!-- <logout v-bind:username="user.uid"></logout> -->
            </ul>
        </div>
    </section>

    <!-- 更多 -->
    <template v-if="addShow==true" v-cloak>
        <div class="cateBoxBg" @click="add();"></div>
        <ul class="cateBox">
            <li><a href="ask.html">提问</a></li>
        </ul>
    </template>

    <share :show.sync="showModal"></share>
    <!-- template for the modal component -->
    <script type="x/template" id="share-template">
        <!-- 头部 -->
        <header class="header" v-show="show">
            <a href="javascript:;" title="返回" class="icon back" @click="cancel();"></a>
            <div class="clearfix search-box searchBigBox">
                <input type="button" class="fl search-btn" @click="search();">
                <input type="text" id="searchword" class="search-txt" placeholder="搜索" value="" maxlength="30" v-model="query">
            </div>
            <a href="javascript:void(0);" title="确认" @click='ok();' class="text">确认</a>
        </header>

        <!-- 通讯录 -->
        <section class="padT23 addrBook" v-show="show">
            <div v-for="info in users">
                <span class="db pad24 font18 color72">{{info.type}}</span>
                <ul id='uluser' class="padLR24 bgff">
                    <!-- 选中则加上 class="on" -->
                    <li dataID='{{info.uid}}' class="padTB24 font24 color21 borderB" @click="checked($event);" v-for="info in info.userList | filterBy query in 'uname'">
                        {{info.uname }}
                    </li>
                </ul>
            </div>

        </section>
    </script>

    <!-- 底部 -->
    <footer class="clearfix footer" v-if="!showModal">
        <a href="index.html" class="footerIcon fhome" title="我要看">我要看</a>
        <a href="asking.html" class="footerIcon on fques" title="我要问">我要问</a>
        <a href="knowledge.html" class="footerIcon fknow" title="知识圈">知识圈</a>
    </footer>

    <script type="text/javascript" src="js/lib/jquery.min.js"></script>
    <script type="text/javascript" src="js/lib/vue.js"></script>
    <script type="text/javascript" src="js/lib/alert.js"></script>
    <script src="js/lib/hammer.min.js"></script>
    <script src="js/lib/vue-touch.js"></script>
    <script type="text/javascript" src="js/lib/common.js"></script>
    <script type="text/javascript" src="js/lib/global.js"></script>
    <script type="text/javascript" src="js/app.js"></script>
    <script type="text/javascript" src="js/asking.js"></script>
</body>

</html>